package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhAdminLogMapper;
import com.ruoyi.xh.domain.XhAdminLog;
import com.ruoyi.xh.service.IXhAdminLogService;

/**
 * 备份Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhAdminLogServiceImpl extends ServiceImpl<XhAdminLogMapper,XhAdminLog> implements IXhAdminLogService {

    /**
     * 查询备份
     * 
     * @param id 备份主键
     * @return 备份
     */
    @Override
    public XhAdminLog selectXhAdminLogById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询备份列表
     * 
     * @param xhAdminLog 备份
     * @return 备份
     */
    @Override
    public Page<XhAdminLog> selectXhAdminLogList(XhAdminLog xhAdminLog)
    {
        return new Page<>();
    }

    /**
     * 新增备份
     * 
     * @param xhAdminLog 备份
     *
     */
    @Override
    public void insertXhAdminLog(XhAdminLog xhAdminLog)
    {
        this.save(xhAdminLog);
    }

    /**
     * 修改备份
     * 
     * @param xhAdminLog 备份
     *
     */
    @Override
    public void updateXhAdminLog(XhAdminLog xhAdminLog)
    {
        this.updateById(xhAdminLog);
    }

    /**
     * 批量删除备份
     * 
     * @param ids 需要删除的备份主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhAdminLogByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
